Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

min(x, 0) → 0
min(0, y) → 0
min(s(x), s(y)) → s(min(x, y))
max(x, 0) → x
max(0, y) → y
max(s(x), s(y)) → s(max(x, y))
minus(x, 0) → x
minus(s(x), s(y)) → s(minus(x, y))
gcd(s(x), s(y)) → gcd(minus(max(x, y), min(x, transform(y))), s(min(x, y)))
transform(x) → s(s(x))
transform(cons(x, y)) → cons(cons(x, x), x)
transform(cons(x, y)) → y
transform(s(x)) → s(s(transform(x)))
cons(x, y) → y
cons(x, cons(y, s(z))) → cons(y, x)
cons(cons(x, z), s(y)) → transform(x)

Q is empty.


QTRS
  ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

min(x, 0) → 0
min(0, y) → 0
min(s(x), s(y)) → s(min(x, y))
max(x, 0) → x
max(0, y) → y
max(s(x), s(y)) → s(max(x, y))
minus(x, 0) → x
minus(s(x), s(y)) → s(minus(x, y))
gcd(s(x), s(y)) → gcd(minus(max(x, y), min(x, transform(y))), s(min(x, y)))
transform(x) → s(s(x))
transform(cons(x, y)) → cons(cons(x, x), x)
transform(cons(x, y)) → y
transform(s(x)) → s(s(transform(x)))
cons(x, y) → y
cons(x, cons(y, s(z))) → cons(y, x)
cons(cons(x, z), s(y)) → transform(x)

Q is empty.

Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

GCD(s(x), s(y)) → MINUS(max(x, y), min(x, transform(y)))
MIN(s(x), s(y)) → MIN(x, y)
TRANSFORM(cons(x, y)) → CONS(x, x)
GCD(s(x), s(y)) → MIN(x, transform(y))
TRANSFORM(s(x)) → TRANSFORM(x)
GCD(s(x), s(y)) → MAX(x, y)
GCD(s(x), s(y)) → MIN(x, y)
TRANSFORM(cons(x, y)) → CONS(cons(x, x), x)
CONS(x, cons(y, s(z))) → CONS(y, x)
CONS(cons(x, z), s(y)) → TRANSFORM(x)
MINUS(s(x), s(y)) → MINUS(x, y)
MAX(s(x), s(y)) → MAX(x, y)
GCD(s(x), s(y)) → GCD(minus(max(x, y), min(x, transform(y))), s(min(x, y)))
GCD(s(x), s(y)) → TRANSFORM(y)

The TRS R consists of the following rules:

min(x, 0) → 0
min(0, y) → 0
min(s(x), s(y)) → s(min(x, y))
max(x, 0) → x
max(0, y) → y
max(s(x), s(y)) → s(max(x, y))
minus(x, 0) → x
minus(s(x), s(y)) → s(minus(x, y))
gcd(s(x), s(y)) → gcd(minus(max(x, y), min(x, transform(y))), s(min(x, y)))
transform(x) → s(s(x))
transform(cons(x, y)) → cons(cons(x, x), x)
transform(cons(x, y)) → y
transform(s(x)) → s(s(transform(x)))
cons(x, y) → y
cons(x, cons(y, s(z))) → cons(y, x)
cons(cons(x, z), s(y)) → transform(x)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ DependencyPairsProof
QDP
      ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

GCD(s(x), s(y)) → MINUS(max(x, y), min(x, transform(y)))
MIN(s(x), s(y)) → MIN(x, y)
TRANSFORM(cons(x, y)) → CONS(x, x)
GCD(s(x), s(y)) → MIN(x, transform(y))
TRANSFORM(s(x)) → TRANSFORM(x)
GCD(s(x), s(y)) → MAX(x, y)
GCD(s(x), s(y)) → MIN(x, y)
TRANSFORM(cons(x, y)) → CONS(cons(x, x), x)
CONS(x, cons(y, s(z))) → CONS(y, x)
CONS(cons(x, z), s(y)) → TRANSFORM(x)
MINUS(s(x), s(y)) → MINUS(x, y)
MAX(s(x), s(y)) → MAX(x, y)
GCD(s(x), s(y)) → GCD(minus(max(x, y), min(x, transform(y))), s(min(x, y)))
GCD(s(x), s(y)) → TRANSFORM(y)

The TRS R consists of the following rules:

min(x, 0) → 0
min(0, y) → 0
min(s(x), s(y)) → s(min(x, y))
max(x, 0) → x
max(0, y) → y
max(s(x), s(y)) → s(max(x, y))
minus(x, 0) → x
minus(s(x), s(y)) → s(minus(x, y))
gcd(s(x), s(y)) → gcd(minus(max(x, y), min(x, transform(y))), s(min(x, y)))
transform(x) → s(s(x))
transform(cons(x, y)) → cons(cons(x, x), x)
transform(cons(x, y)) → y
transform(s(x)) → s(s(transform(x)))
cons(x, y) → y
cons(x, cons(y, s(z))) → cons(y, x)
cons(cons(x, z), s(y)) → transform(x)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 5 SCCs with 5 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
QDP
            ↳ QDPOrderProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

TRANSFORM(cons(x, y)) → CONS(cons(x, x), x)
CONS(x, cons(y, s(z))) → CONS(y, x)
CONS(cons(x, z), s(y)) → TRANSFORM(x)
TRANSFORM(cons(x, y)) → CONS(x, x)
TRANSFORM(s(x)) → TRANSFORM(x)

The TRS R consists of the following rules:

min(x, 0) → 0
min(0, y) → 0
min(s(x), s(y)) → s(min(x, y))
max(x, 0) → x
max(0, y) → y
max(s(x), s(y)) → s(max(x, y))
minus(x, 0) → x
minus(s(x), s(y)) → s(minus(x, y))
gcd(s(x), s(y)) → gcd(minus(max(x, y), min(x, transform(y))), s(min(x, y)))
transform(x) → s(s(x))
transform(cons(x, y)) → cons(cons(x, x), x)
transform(cons(x, y)) → y
transform(s(x)) → s(s(transform(x)))
cons(x, y) → y
cons(x, cons(y, s(z))) → cons(y, x)
cons(cons(x, z), s(y)) → transform(x)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


TRANSFORM(cons(x, y)) → CONS(cons(x, x), x)
CONS(x, cons(y, s(z))) → CONS(y, x)
CONS(cons(x, z), s(y)) → TRANSFORM(x)
TRANSFORM(cons(x, y)) → CONS(x, x)
The remaining pairs can at least be oriented weakly.

TRANSFORM(s(x)) → TRANSFORM(x)
Used ordering: Matrix interpretation [3]:
Non-tuple symbols:
M( cons(x1, x2) ) =
/0\
\2/
+
/21\
\21/
·x1+
/20\
\01/
·x2

M( transform(x1) ) =
/0\
\1/
+
/33\
\23/
·x1

M( s(x1) ) =
/0\
\0/
+
/10\
\01/
·x1

Tuple symbols:
M( TRANSFORM(x1) ) = 1+
[2,1]
·x1

M( CONS(x1, x2) ) = 0+
[0,1]
·x1+
[0,1]
·x2


Matrix type:
We used a basic matrix type which is not further parametrizeable.


As matrix orders are CE-compatible, we used usable rules w.r.t. argument filtering in the order.
The following usable rules [17] were oriented:

transform(x) → s(s(x))
transform(s(x)) → s(s(transform(x)))
cons(x, y) → y
transform(cons(x, y)) → cons(cons(x, x), x)
cons(x, cons(y, s(z))) → cons(y, x)
cons(cons(x, z), s(y)) → transform(x)
transform(cons(x, y)) → y



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

TRANSFORM(s(x)) → TRANSFORM(x)

The TRS R consists of the following rules:

min(x, 0) → 0
min(0, y) → 0
min(s(x), s(y)) → s(min(x, y))
max(x, 0) → x
max(0, y) → y
max(s(x), s(y)) → s(max(x, y))
minus(x, 0) → x
minus(s(x), s(y)) → s(minus(x, y))
gcd(s(x), s(y)) → gcd(minus(max(x, y), min(x, transform(y))), s(min(x, y)))
transform(x) → s(s(x))
transform(cons(x, y)) → cons(cons(x, x), x)
transform(cons(x, y)) → y
transform(s(x)) → s(s(transform(x)))
cons(x, y) → y
cons(x, cons(y, s(z))) → cons(y, x)
cons(cons(x, z), s(y)) → transform(x)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
            ↳ QDPOrderProof
              ↳ QDP
                ↳ UsableRulesProof
QDP
                    ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

TRANSFORM(s(x)) → TRANSFORM(x)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

MINUS(s(x), s(y)) → MINUS(x, y)

The TRS R consists of the following rules:

min(x, 0) → 0
min(0, y) → 0
min(s(x), s(y)) → s(min(x, y))
max(x, 0) → x
max(0, y) → y
max(s(x), s(y)) → s(max(x, y))
minus(x, 0) → x
minus(s(x), s(y)) → s(minus(x, y))
gcd(s(x), s(y)) → gcd(minus(max(x, y), min(x, transform(y))), s(min(x, y)))
transform(x) → s(s(x))
transform(cons(x, y)) → cons(cons(x, x), x)
transform(cons(x, y)) → y
transform(s(x)) → s(s(transform(x)))
cons(x, y) → y
cons(x, cons(y, s(z))) → cons(y, x)
cons(cons(x, z), s(y)) → transform(x)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

MINUS(s(x), s(y)) → MINUS(x, y)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

MAX(s(x), s(y)) → MAX(x, y)

The TRS R consists of the following rules:

min(x, 0) → 0
min(0, y) → 0
min(s(x), s(y)) → s(min(x, y))
max(x, 0) → x
max(0, y) → y
max(s(x), s(y)) → s(max(x, y))
minus(x, 0) → x
minus(s(x), s(y)) → s(minus(x, y))
gcd(s(x), s(y)) → gcd(minus(max(x, y), min(x, transform(y))), s(min(x, y)))
transform(x) → s(s(x))
transform(cons(x, y)) → cons(cons(x, x), x)
transform(cons(x, y)) → y
transform(s(x)) → s(s(transform(x)))
cons(x, y) → y
cons(x, cons(y, s(z))) → cons(y, x)
cons(cons(x, z), s(y)) → transform(x)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

MAX(s(x), s(y)) → MAX(x, y)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

MIN(s(x), s(y)) → MIN(x, y)

The TRS R consists of the following rules:

min(x, 0) → 0
min(0, y) → 0
min(s(x), s(y)) → s(min(x, y))
max(x, 0) → x
max(0, y) → y
max(s(x), s(y)) → s(max(x, y))
minus(x, 0) → x
minus(s(x), s(y)) → s(minus(x, y))
gcd(s(x), s(y)) → gcd(minus(max(x, y), min(x, transform(y))), s(min(x, y)))
transform(x) → s(s(x))
transform(cons(x, y)) → cons(cons(x, x), x)
transform(cons(x, y)) → y
transform(s(x)) → s(s(transform(x)))
cons(x, y) → y
cons(x, cons(y, s(z))) → cons(y, x)
cons(cons(x, z), s(y)) → transform(x)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

MIN(s(x), s(y)) → MIN(x, y)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

GCD(s(x), s(y)) → GCD(minus(max(x, y), min(x, transform(y))), s(min(x, y)))

The TRS R consists of the following rules:

min(x, 0) → 0
min(0, y) → 0
min(s(x), s(y)) → s(min(x, y))
max(x, 0) → x
max(0, y) → y
max(s(x), s(y)) → s(max(x, y))
minus(x, 0) → x
minus(s(x), s(y)) → s(minus(x, y))
gcd(s(x), s(y)) → gcd(minus(max(x, y), min(x, transform(y))), s(min(x, y)))
transform(x) → s(s(x))
transform(cons(x, y)) → cons(cons(x, x), x)
transform(cons(x, y)) → y
transform(s(x)) → s(s(transform(x)))
cons(x, y) → y
cons(x, cons(y, s(z))) → cons(y, x)
cons(cons(x, z), s(y)) → transform(x)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


GCD(s(x), s(y)) → GCD(minus(max(x, y), min(x, transform(y))), s(min(x, y)))
The remaining pairs can at least be oriented weakly.
none
Used ordering: Matrix interpretation [3]:
Non-tuple symbols:
M( cons(x1, x2) ) =
/0\
\0/
+
/00\
\01/
·x1+
/00\
\11/
·x2

M( minus(x1, x2) ) =
/0\
\0/
+
/10\
\01/
·x1+
/00\
\00/
·x2

M( max(x1, x2) ) =
/0\
\1/
+
/10\
\01/
·x1+
/10\
\01/
·x2

M( transform(x1) ) =
/0\
\0/
+
/00\
\00/
·x1

M( s(x1) ) =
/1\
\1/
+
/11\
\11/
·x1

M( min(x1, x2) ) =
/0\
\0/
+
/01\
\10/
·x1+
/00\
\00/
·x2

M( 0 ) =
/0\
\0/

Tuple symbols:
M( GCD(x1, x2) ) = 0+
[1,1]
·x1+
[0,1]
·x2


Matrix type:
We used a basic matrix type which is not further parametrizeable.


As matrix orders are CE-compatible, we used usable rules w.r.t. argument filtering in the order.
The following usable rules [17] were oriented:

max(0, y) → y
max(s(x), s(y)) → s(max(x, y))
min(s(x), s(y)) → s(min(x, y))
max(x, 0) → x
minus(x, 0) → x
minus(s(x), s(y)) → s(minus(x, y))
min(0, y) → 0
min(x, 0) → 0



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ PisEmptyProof

Q DP problem:
P is empty.
The TRS R consists of the following rules:

min(x, 0) → 0
min(0, y) → 0
min(s(x), s(y)) → s(min(x, y))
max(x, 0) → x
max(0, y) → y
max(s(x), s(y)) → s(max(x, y))
minus(x, 0) → x
minus(s(x), s(y)) → s(minus(x, y))
gcd(s(x), s(y)) → gcd(minus(max(x, y), min(x, transform(y))), s(min(x, y)))
transform(x) → s(s(x))
transform(cons(x, y)) → cons(cons(x, x), x)
transform(cons(x, y)) → y
transform(s(x)) → s(s(transform(x)))
cons(x, y) → y
cons(x, cons(y, s(z))) → cons(y, x)
cons(cons(x, z), s(y)) → transform(x)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.